<template>
	<view class="cardstyle">
		<slot name="header"></slot>
		<image src="/static/logo.png" style="width: 50rpx;height: 60rpx;"/>
		<text class="titlebox">{{title}}</text>
		<view class="tipsbox">
			<text style="color: #f00;">置顶</text>
			<text>{{author}}</text>
			<text>评</text>
			<view style="flex: 1; display: flex; justify-content: flex-end;">
				<text>{{time}}</text>
			</view>
		</view>
		<slot name="tips"></slot>
		<slot name="footer"></slot>
	</view>
</template>

<script>
	export default {
		name: "cardViewText",
		data() {
			return {
				
			}
		},
		props: {
			title: {
				type: String,
				default: "新闻标题",
				require: true
			},
			isTop: {
				type: Boolean,
				default: false,
				require: true
			},
			author: {
				type: String,
				default: "来源",
				require: true
			},
			comments: {
				type: Number,
				default: 0,
				require: true
			},
			time: {
				type: String,
				default: "2025.1.1"
			}
		},
		methods: {

		}
	}
</script>

<style>
	.cardstyle {
		
		margin-bottom: 32rpx;
		background: lightcyan;
		border-radius: 8rpx;
		padding: 20rpx;
		box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
		border-radius: 20rpx;
		margin: 10rpx;
	}
</style>